gridpack::math::NonlinearSolverInterface< T, I > Class Template Reference

Interface to a solve system of nonlinear equations in parallel. More...

#include <nonlinear_solver_interface.hpp>

Inheritance diagram for gridpack::math::NonlinearSolverInterface< T, I >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef VectorT< T, I > VectorType
typedef MatrixT< T, I > MatrixType

Public Member Functions

 NonlinearSolverInterface ()
 Default constructor.
virtual ~NonlinearSolverInterface (void)
 Destructor.
double tolerance (void) const
 Get the solution tolerance.
void tolerance (const double &tol)
 Set the solver tolerance.
int maximumIterations (void) const
 Get the maximum iterations.
void maximumIterations (const int &n)
 Set the maximum solution iterations.
void solve (VectorType &x)
 Solve w/ the specified initial estimated, put result in same vector.

Detailed Description

template<typename T, typename I = int>
class gridpack::math::NonlinearSolverInterface< T, I >

Interface to a solve system of nonlinear equations in parallel.

This serves as a base for classes that solve a system of nonlinear equations. While not strictly abstract, it has no function if instantiated on its own.

It encapuslates the nonlinear system solver of some underlying implementation. The Pimpl idiom is used for implementation, so user code is completely independent of the underlying library. This class simply provides an interface to a specific implementation. Subclasses are required to call p_set_impl() at construction to set the implementation.


Member Typedef Documentation

template<typename T, typename I = int>
typedef MatrixT<T, I> gridpack::math::NonlinearSolverInterface< T, I >::MatrixType
template<typename T, typename I = int>
typedef VectorT<T, I> gridpack::math::NonlinearSolverInterface< T, I >::VectorType

Constructor & Destructor Documentation

template<typename T, typename I = int>
gridpack::math::NonlinearSolverInterface< T, I >::NonlinearSolverInterface (  ) 

Default constructor.

template<typename T, typename I = int>
virtual gridpack::math::NonlinearSolverInterface< T, I >::~NonlinearSolverInterface ( void   )  [virtual]

Destructor.


Member Function Documentation

template<typename T, typename I = int>
void gridpack::math::NonlinearSolverInterface< T, I >::maximumIterations ( const int &  n  ) 

Set the maximum solution iterations.

Parameters:
n new maximum number of iterations
template<typename T, typename I = int>
int gridpack::math::NonlinearSolverInterface< T, I >::maximumIterations ( void   )  const

Get the maximum iterations.

Returns:
current maximum number of solution iterations
template<typename T, typename I = int>
void gridpack::math::NonlinearSolverInterface< T, I >::solve ( VectorType x  ) 

Solve w/ the specified initial estimated, put result in same vector.

This solves the system of nonlinear equations using the contents of x as an initial solution estimate. The final result is placed back in x upon completion.

Parameters:
x solution Vector
template<typename T, typename I = int>
void gridpack::math::NonlinearSolverInterface< T, I >::tolerance ( const double &  tol  ) 

Set the solver tolerance.

Parameters:
tol new solution tolerance
template<typename T, typename I = int>
double gridpack::math::NonlinearSolverInterface< T, I >::tolerance ( void   )  const

Get the solution tolerance.

Returns:
current solution tolerance

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1